<template>
  <order-list ref="OrderListRef" mode="task" />
</template>

<script>
  export default {
    data() {
      return {
        initLoad: false
      };
    },
    methods: {
      loadRes(reset = true, callback = null) {
        this.$refs.OrderListRef.loadRes(reset, callback)
      },
    },
    onTabItemTap() {
      if (this.initLoad) {
        this.loadRes()
      }
    },
    onReady() {
      this.initLoad = true
      this.loadRes()
    },
    onUnload() {
      this.initLoad = false
    },
    onReachBottom() {
      this.loadRes(false)
    },
    onPullDownRefresh() {
      this.loadRes(true, () => {
        uni.stopPullDownRefresh()
      })
    }
  }
</script>

<style lang="scss">

</style>
